<template>
  <section class="section-wrapper">
    <div class="title" v-if="isShowTitle">
      <span>{{ title }}</span
      ><br /><span class="line"></span>
    </div>
    <div class="slot-body" :class="needCenterWrapper ? 'content-wrapper' : ''">
      <slot name="body"></slot>
    </div>
  </section>
</template>

<script>
export default {
  name: "index",
  props: {
    isShowTitle: {
      type: Boolean,
      default: true
    },
    title: {
      type: String,
      default: ""
    },
    //是否需要1660居中wrapper
    needCenterWrapper: {
      type: Boolean,
      default: false
    }
  }
};
</script>

<style scoped lang="less">
.section-wrapper {
  width: 100%;
  .title {
    font-size: 30px;
    font-weight: bold;
    padding: 54px 0 34px 0;
    text-align: center;
    color: @primary-color;
    .line {
      display: inline-block;
      width: 32px;
      height: 5px;
      border-radius: 5px;
      background: @primary-color;
    }
  }
  .slot-body {
    text-align: left;
  }
}
</style>
